
package xj.toolkit.bean.tlv.decode.decoders;

import xj.toolkit.bean.tlv.decode.TLVDecodeContext;
import xj.toolkit.bean.tlv.decode.TLVDecoder;

public class BooleanTLVDecoder implements TLVDecoder {
	
    public Object decode(int tlvLength, byte[] tlvValue, TLVDecodeContext ctx) {
        return new Boolean(0 != tlvValue[0]);
    }
    
    public Class<?>[] getFieldType() {
		return new Class<?>[]{boolean.class, Boolean.class};
	}
}
